home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Amiga Format CD 44
/
Amiga Format CD44 (1999-08-26)(Future Publishing)(GB)(Track 1 of 3)[!][issue 1999-10].iso
/
-serious-
/
misc
/
cmq060
/
source
/
cmq060.s
< prev
next >
Wrap
Text File
|
1999-07-26
|
2KB
|
78 lines
*******************************************
* CopyMemQuicker060 *
* Uses Move16 only in Adresses >$00ffffff *
* *
* Install File V1.4 *
* written by Dirk Busse *
* 3. Apr. 1999 *
*******************************************
MACHINE 68060
INCDIR include:
include exec/execbase.i
include exec/memory.i
include dos/dos.i
include LVO.i
PatchLen equ PatchEnd-PatchStart
*=========================================================================
movea.l 4.w,a6
;------ Check for 68040 or 68060
btst #3,AttnFlags+1(a6)
bne.b MC040or060 ; No 68040 or 68060 ...
Fail moveq #RETURN_FAIL,d0
rts
MC040or060
;------ Allocate a buffer to store the patches.
move.l #PatchLen+15,d0
moveq #MEMF_PUBLIC,d1
jsr _LVOAllocMem(a6)
move.l d0,d6
beq.b Fail ; No memory available
;------ Copy our patches in the buffer.
addi #15,d6
andi.b #%11110000,d6 ; Now we have an address modulo 16
lea PatchStart(pc),a0
movea.l d6,a1
move.l #PatchLen,d0
jsr Quickest ; The new CopyMemQuicker
;------ Install the patches.
movea.l a6,a1 ; ExecBase to a1
lea (_LVOCopyMem).w,a0 ; funcOffset to a0
move.l d6,d0 ; New Address to d0
jsr _LVOSetFunction(a6)
movea.l a6,a1
lea (_LVOCopyMemQuick).w,a0
move.l d6,d0
addi.l #Quickest-PatchStart,d0
jsr _LVOSetFunction(a6)
moveq #RETURN_OK,d0 ; That's all.
rts
dc.b "$VER: CMQ060 1.4 (3.4.99)",0
cnop 0,8
*=========================================================================
include CMQ060.Include.s
*=========================================================================